chain.from_iterable method from the itertools built-in module with python programming